#ifndef GLOBALEVTHANDLER_H
#define GLOBALEVTHANDLER_H

#include "global.h"
#include <wx/event.h>
#include <wx/panel.h>
#include <wx/image.h>
#include <wx/html/htmlwin.h>
#include <wx/html/htmprint.h>
#include <wx/textdlg.h>
#include <wx/print.h>
#include <wx/printdlg.h>
#include <wx/statline.h>
#include <wx/stattext.h>
#include <wx/datetime.h>
#include <wx/txtstrm.h>

#include "doubleball.h"
#include "geometryShapeConstruction.h"
WX_DECLARE_STRING_HASH_MAP( wxString, redBallHM);
class GlobalEvtHandler : public wxEvtHandler
{

    public:
        static int PageSize;
        static long pageIndex;
        static long totalPage;
        static wxTextCtrl* startterm;
        static wxHtmlWindow * ls36html;


         static wxString  CurrentPAGE;
         static wxHtmlPrintout* printer;
         static wxHtmlPrintout* watch;
        //toolbar toolitem
        static wxComboBox*	 m_comboBox1;
static wxComboBox*	 m_comboBox2;
static wxComboBox*	 m_comboBox3;
static wxComboBox*	 m_comboBox4;
static wxComboBox*	 m_comboBox5;
static wxComboBox*	 m_comboBox6;
static wxComboBox*	 blue_combobox;

static wxCheckBox*   positionStrict;
static wxComboBox*   watchNext;
static wxHtmlWindow* historywin;
static wxStaticText*  infolabel;
static wxStaticText*  book1infolabel;
static redBallHM book1terms;
 //add for 对偶数
 static wxTextCtrl * endmatch;
 static wxTextCtrl * startmatch;
 static wxComboBox* h_comboBox1;
 static wxComboBox* h_comboBox2;
 static wxComboBox* h_comboBox3;
 static wxComboBox* h_comboBox4;
 static wxComboBox* h_comboBox5;
 static wxComboBox* h_comboBox6;
 static wxComboBox* h_blue_combobox;
 static wxComboBox* h_termlist;
 static wxCheckBox* h_positionStrict;
 static wxComboBox* h_watchNext;
 static wxCheckBox* h_follow;
 static wxTextCtrl* searchstartterm;//search ui start term
 static wxTextCtrl* sqltext;

 static wxHtmlWindow* h_historywin;
static wxDialog* h_dialog;//dialog proxy
//for AI action part
static wxComboBox*	 termlist;
 static wxTextCtrl * termrange;//分析期数

        /** Default constructor */
        GlobalEvtHandler();
        /** Default destructor */
        virtual ~GlobalEvtHandler();
   wxWindow* book1MultiThread(wxWindow* parent);
   wxWindow* book1InputHistorySQL(wxWindow* parent);
   wxWindow* book1LS36(wxWindow* parent);
   wxWindow* book1Database(wxWindow* parent);

//event handler
void OnPagingHandler(wxCommandEvent& event);
void OnECLHandler(wxCommandEvent& event);
void OnRedBallDistanceHandler(wxCommandEvent& event);
void OnExportECLFileHandler(wxCommandEvent& event);
//
void OnLISPSaveHandler(wxCommandEvent& event);
void OnLISPDelHandler(wxCommandEvent& event);

void OnCopytoClipBoardHander(wxCommandEvent& event);
void OnPagePrintHandler(wxCommandEvent& event);
void OnSearchHandler(wxCommandEvent& event);
void startAIAction(wxCommandEvent& event);
void comboboxSelected(wxCommandEvent& event);
void InternetUpdate(wxCommandEvent& event);
void DestroyDialog(wxCommandEvent& event);
redBallHM getTermList(int number=33,bool reverorder=false);
    protected:
    private:
};


#endif // GLOBALEVTHANDLER_H
